package com.sna.snaapplication.controller.Orekit;



import com.sna.snaapplication.service.Orekit.SatelliteOrbitService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SatelliteOrbitController {

    @Autowired
    private SatelliteOrbitService2 satelliteOrbitService2;

    @GetMapping("/j2000-orbit-czml2")
    public ResponseEntity<?> getJ2000OrbitCZML2() {
        try {
            String czmlJson = satelliteOrbitService2.getJ2000OrbitCZML2();
            return ResponseEntity.ok(czmlJson);
        } catch (RuntimeException e) {
            return ResponseEntity.badRequest().body("错误：" + e.getMessage());
        }
    }



}
